<?php 
namespace Admin\Controller;
use Think\Controller;
class SysController extends CommonController{
	public function index(){
		$this -> id = 1;
		$model = D('Sys');
		$sys = $model -> find();
		$this -> assign('sys',$sys);
		$this -> display();
	}
	public function editDo(){
		if(!IS_POST){
			$this -> error('非法提交数据');
			exit;
		}else{
			$model = D('Sys');
			$info = $model -> editDo();
			if($info == true){
				$this -> success('提交成功',U('Sys/index',array('id'=>I('id'))));
			}else{
				$this -> error('提交失败');
			}			
		}
	}
}